<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class MemcacheManager</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class MemcacheManager</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Begin Document</p>
		<p class="notes">
			Located in <a class="field" href="_classes---class_MemcacheManager.php.html">/classes/class_MemcacheManager.php</a> (line <span class="field">35</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																																																																												<div class="method-definition">
					static 						<span class="method-result">void</span>
										<a href="#_failure" title="details" class="method-name">_failure</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$host</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$port</span>)
									</div>
								
												<div class="method-definition">
											<span class="method-result">MemcacheManager</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#add" title="details" class="method-name">add</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$var</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$expire</span> = <span class="var-default">0</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$json</span> = <span class="var-default">false</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$encrypt</span> = <span class="var-default">false</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$zlib</span> = <span class="var-default">false</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#addserver" title="details" class="method-name">addserver</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$host</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$port</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#decrement" title="details" class="method-name">decrement</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$value</span> = <span class="var-default">1</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#decrypt" title="details" class="method-name">decrypt</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$string</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#delete" title="details" class="method-name">delete</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$timeout</span> = <span class="var-default">0</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#encrypt" title="details" class="method-name">encrypt</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$string</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#flushmc" title="details" class="method-name">flushmc</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#get" title="details" class="method-name">get</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$keys</span>, [<span class="var-type">bool</span>&nbsp;<span class="var-name">$json</span> = <span class="var-default">false</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$decrypt</span> = <span class="var-default">false</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$zlib</span> = <span class="var-default">false</span>], <span class="var-type">bool</span>&nbsp;<span class="var-name">$encrypt</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#increment" title="details" class="method-name">increment</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$value</span> = <span class="var-default">1</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#pbkdf2" title="details" class="method-name">pbkdf2</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$p</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$s</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$c</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$kl</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$a</span> = <span class="var-default">'sha256'</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#replace" title="details" class="method-name">replace</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$var</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$expire</span> = <span class="var-default">0</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$json</span> = <span class="var-default">false</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$encrypt</span> = <span class="var-default">false</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$zlib</span> = <span class="var-default">false</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#report" title="details" class="method-name">report</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#set" title="details" class="method-name">set</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$var</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$expire</span> = <span class="var-default">0</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$json</span> = <span class="var-default">false</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$encrypt</span> = <span class="var-default">false</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$zlib</span> = <span class="var-default">false</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#statistics" title="details" class="method-name">statistics</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#status" title="details" class="method-name">status</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$host</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$port</span>)
									</div>
																</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="method_failure" id="_failure"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static method _failure</span> (line <span class="line-number">115</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Callback Handler for failed connection</p>
	<ul class="tags">
				<li><span class="field">author:</span> Peter Schmalfeldt</li>
				<li><span class="field">version:</span> 1.0</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">void</span>
		<span class="method-name">
			_failure
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$host</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$port</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$host</span><span class="var-description">: Point to the host where memcached is listening for connections. This parameter may also specify other transports like unix:///path/to/memcached.sock  to use UNIX domain sockets, in this case port  must also be set to 0.</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$port</span><span class="var-description">: Point to the port where memcached is listening for connections. This parameter is optional and its default value is 11211. Set this parameter to 0 when using UNIX domain sockets.</span>			</li>
				</ul>
		
			
	</div>

<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">98</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
<p class="description"><p>Create Memcache Manager  <div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../MemcacheManager/MemcacheManager.html">MemcacheManager</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodaddserver">addserver</a><span class="src-sym">(</span><span class="src-str">'localhost'</span><span class="src-sym">,&nbsp;</span><span class="src-num">11211</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'username'</span>=&gt;<span class="src-str">'memcachelover'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'email'</span>=&gt;<span class="src-str">'me@myemail.com'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'displayname'</span>=&gt;<span class="src-str">'Memcache&nbsp;Lover'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'location'</span>=&gt;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'country'</span>=&gt;<span class="src-str">'USA'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'state'</span>=&gt;<span class="src-str">'Oregon'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'city'</span>=&gt;<span class="src-str">'Portland'</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodadd">add</a><span class="src-sym">(</span><span class="src-str">'memcachelover'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-comm">//&nbsp;adds&nbsp;the&nbsp;key&nbsp;with&nbsp;JSON&nbsp;encoding,&nbsp;encryption&nbsp;and&nbsp;compression</span></div></li>
<li><div class="src-line">&nbsp;echo&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodget">get</a><span class="src-sym">(</span><span class="src-str">'memcachelover'</span><span class="src-sym">,&nbsp;</span><span class="src-id">false</span><span class="src-sym">,&nbsp;</span><span class="src-id">false</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-comm">//&nbsp;would&nbsp;echo&nbsp;the&nbsp;uncompressed,&nbsp;but&nbsp;still&nbsp;encrypted&nbsp;key</span></div></li>
<li><div class="src-line">&nbsp;echo&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodget">get</a><span class="src-sym">(</span><span class="src-str">'memcachelover'</span><span class="src-sym">,&nbsp;</span><span class="src-id">false</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-comm">//&nbsp;would&nbsp;echo&nbsp;the&nbsp;uncompressed,&nbsp;decrypted&nbsp;JSON&nbsp;formatted&nbsp;string</span></div></li>
<li><div class="src-line">&nbsp;<a href="http://www.php.net/print_r">print_r</a><span class="src-sym">(</span><span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodget">get</a><span class="src-sym">(</span><span class="src-str">'memcachelover'</span><span class="src-sym">,</span><span class="src-id">true</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">))</span><span class="src-sym">;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-comm">//&nbsp;would&nbsp;print&nbsp;the&nbsp;uncompressed,&nbsp;decrypted&nbsp;array</span></div></li>
<li><div class="src-line">&nbsp;<a href="http://www.php.net/print_r">print_r</a><span class="src-sym">(</span><span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodstatistics">statistics</a><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-comm">//&nbsp;this&nbsp;would&nbsp;print&nbsp;the&nbsp;array&nbsp;of&nbsp;usage&nbsp;stats&nbsp;for&nbsp;all&nbsp;servers</span></div></li>
<li><div class="src-line">&nbsp;echo&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodreport">report</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-comm">//&nbsp;this&nbsp;would&nbsp;print&nbsp;our&nbsp;custom&nbsp;report</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodflushmc">flushmc</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-comm">//&nbsp;this&nbsp;would&nbsp;fluch&nbsp;all&nbsp;connected&nbsp;servers</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><span class="src-id">close</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-comm">//&nbsp;this&nbsp;would&nbsp;close&nbsp;all&nbsp;connections</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">MemcacheManager</span>
		<span class="method-name">
			__construct
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodadd" id="add"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">add</span> (line <span class="line-number">231</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Stores variable $var with $key ONLY if such key doesn't exist at the server yet.</p>
<p class="description"><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../MemcacheManager/MemcacheManager.html">MemcacheManager</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodaddserver">addserver</a><span class="src-sym">(</span><span class="src-str">'localhost'</span><span class="src-sym">,&nbsp;</span><span class="src-num">11211</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodadd">add</a><span class="src-sym">(</span><span class="src-str">'mykey1'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$myarray1</span><span class="src-sym">,&nbsp;</span><span class="src-num">30</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodadd">add</a><span class="src-sym">(</span><span class="src-str">'mykey2'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$myarray2</span><span class="src-sym">,&nbsp;</span><span class="src-num">30</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodadd">add</a><span class="src-sym">(</span><span class="src-str">'mykey3'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$myarray3</span><span class="src-sym">,&nbsp;</span><span class="src-num">30</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodadd">add</a><span class="src-sym">(</span><span class="src-str">'mykey4'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$myarray4</span><span class="src-sym">,&nbsp;</span><span class="src-num">30</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodadd">add</a><span class="src-sym">(</span><span class="src-str">'mykey5'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$myarray5</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			add
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$var</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$expire</span> = <span class="var-default">0</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$json</span> = <span class="var-default">false</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$encrypt</span> = <span class="var-default">false</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$zlib</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$key</span><span class="var-description">: The key that will be associated with the item</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$var</span><span class="var-description">: The variable to store. Strings and integers are stored as is, other types are stored serialized.</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$expire</span><span class="var-description">: Expiration time of the item. If it's equal to zero, the item will never expire. You can also use Unix timestamp or a number of seconds starting from current time, but in the latter case the number of seconds may not exceed 2592000 (30 days).</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$json</span><span class="var-description">: Whether to encode using JSON</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$encrypt</span><span class="var-description">: Whether to encrypt string</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$zlib</span><span class="var-description">: Use MEMCACHE_COMPRESSED to store the item compressed (uses zlib).</span>			</li>
				</ul>
		
			
	</div>
<a name="methodaddserver" id="addserver"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">addserver</span> (line <span class="line-number">134</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Add a memcached server to connection pool</p>
<p class="description"><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../MemcacheManager/MemcacheManager.html">MemcacheManager</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodaddserver">addserver</a><span class="src-sym">(</span><span class="src-str">'localhost'</span><span class="src-sym">,&nbsp;</span><span class="src-num">11211</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			addserver
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$host</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$port</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$host</span><span class="var-description">: Point to the host where memcached is listening for connections. This parameter may also specify other transports like unix:///path/to/memcached.sock  to use UNIX domain sockets, in this case port  must also be set to 0.</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$port</span><span class="var-description">: Point to the port where memcached is listening for connections. This parameter is optional and its default value is 11211. Set this parameter to 0 when using UNIX domain sockets.</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddecrement" id="decrement"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">decrement</span> (line <span class="line-number">394</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Decrement item's value</p>
<p class="description"><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../MemcacheManager/MemcacheManager.html">MemcacheManager</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodaddserver">addserver</a><span class="src-sym">(</span><span class="src-str">'localhost'</span><span class="src-sym">,&nbsp;</span><span class="src-num">11211</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methoddecrement">decrement</a><span class="src-sym">(</span><span class="src-str">'mykey1'</span><span class="src-sym">,&nbsp;</span><span class="src-num">5</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methoddecrement">decrement</a><span class="src-sym">(</span><span class="src-str">'mykey2'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			decrement
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$value</span> = <span class="var-default">1</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$key</span><span class="var-description">: Key of the item do decrement.</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$value</span><span class="var-description">: Decrement the item by value . Optional and defaults to 1.</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddecrypt" id="decrypt"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">decrypt</span> (line <span class="line-number">704</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Decrypt String with Key</p>
<p class="description"><p>The function decryptString()</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> Decrypted String</li>
				<li><span class="field">author:</span> Peter Schmalfeldt</li>
				<li><span class="field">version:</span> 1.0</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			decrypt
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$string</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$string</span><span class="var-description">: String to Decrypt</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddelete" id="delete"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">delete</span> (line <span class="line-number">347</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Delete item from the server</p>
<p class="description"><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../MemcacheManager/MemcacheManager.html">MemcacheManager</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodaddserver">addserver</a><span class="src-sym">(</span><span class="src-str">'localhost'</span><span class="src-sym">,&nbsp;</span><span class="src-num">11211</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methoddelete">delete</a><span class="src-sym">(</span><span class="src-str">'mykey1'</span><span class="src-sym">,&nbsp;</span><span class="src-num">30</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methoddelete">delete</a><span class="src-sym">(</span><span class="src-str">'mykey2'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			delete
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$timeout</span> = <span class="var-default">0</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$key</span><span class="var-description">: The key associated with the item to delete.</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$timeout</span><span class="var-description">: Execution time of the item. If it's equal to zero, the item will be deleted right away whereas if you set it to 30, the item will be deleted in 30 seconds.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodencrypt" id="encrypt"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">encrypt</span> (line <span class="line-number">734</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Encrypt String with Key</p>
<p class="description"><p>The function encryptString()</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> Encoded String</li>
				<li><span class="field">author:</span> Peter Schmalfeldt</li>
				<li><span class="field">version:</span> 1.0</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			encrypt
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$string</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$string</span><span class="var-description">: String to Encrypt</span>			</li>
				</ul>
		
			
	</div>
<a name="methodflushmc" id="flushmc"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">flushmc</span> (line <span class="line-number">202</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Immediately invalidates all existing items but doesn't actually free any resources, it only marks all the items as expired, so occupied memory will be overwritten by new items.</p>
<p class="description"><p>Please note that after flushing, you have to wait about a second to be able to write to Memcached again. If you don't, your data is not saved.</p><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../MemcacheManager/MemcacheManager.html">MemcacheManager</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodaddserver">addserver</a><span class="src-sym">(</span><span class="src-str">'localhost'</span><span class="src-sym">,&nbsp;</span><span class="src-num">11211</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodflushmc">flushmc</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			flushmc
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodget" id="get"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">get</span> (line <span class="line-number">321</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Retrieve item from the server</p>
<p class="description"><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../MemcacheManager/MemcacheManager.html">MemcacheManager</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodaddserver">addserver</a><span class="src-sym">(</span><span class="src-str">'localhost'</span><span class="src-sym">,&nbsp;</span><span class="src-num">11211</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;echo&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodget">get</a><span class="src-sym">(</span><span class="src-str">'mykey1'</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;echo&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodget">get</a><span class="src-sym">(</span><span class="src-str">'mykey2'</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;echo&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodget">get</a><span class="src-sym">(</span><span class="src-str">'mykey3'</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;echo&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodget">get</a><span class="src-sym">(</span><span class="src-str">'mykey4'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			get
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$keys</span>, [<span class="var-type">bool</span>&nbsp;<span class="var-name">$json</span> = <span class="var-default">false</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$decrypt</span> = <span class="var-default">false</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$zlib</span> = <span class="var-default">false</span>], <span class="var-type">bool</span>&nbsp;<span class="var-name">$encrypt</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$keys</span><span class="var-description">: The key or array of keys to fetch</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$json</span><span class="var-description">: Whether to decode using JSON</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$encrypt</span><span class="var-description">: Whether to decrypt string</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$zlib</span><span class="var-description">: Use MEMCACHE_COMPRESSED to store the item compressed (uses zlib).</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$decrypt</span>			</li>
				</ul>
		
			
	</div>
<a name="methodincrement" id="increment"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">increment</span> (line <span class="line-number">373</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Increment item's value</p>
<p class="description"><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../MemcacheManager/MemcacheManager.html">MemcacheManager</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodaddserver">addserver</a><span class="src-sym">(</span><span class="src-str">'localhost'</span><span class="src-sym">,&nbsp;</span><span class="src-num">11211</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodincrement">increment</a><span class="src-sym">(</span><span class="src-str">'mykey1'</span><span class="src-sym">,&nbsp;</span><span class="src-num">5</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodincrement">increment</a><span class="src-sym">(</span><span class="src-str">'mykey2'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			increment
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$value</span> = <span class="var-default">1</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$key</span><span class="var-description">: Key of the item to increment</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$value</span><span class="var-description">: Increment the item by value . Optional and defaults to 1.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodpbkdf2" id="pbkdf2"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">pbkdf2</span> (line <span class="line-number">761</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PBKDF2 Implementation (as described in RFC 2898);</p>
	<ul class="tags">
				<li><span class="field">return:</span> derived key</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			pbkdf2
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$p</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$s</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$c</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$kl</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$a</span> = <span class="var-default">'sha256'</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$p</span><span class="var-description">: Password</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$s</span><span class="var-description">: Salt</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$c</span><span class="var-description">: Iteration count (use 1000 or higher)</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$kl</span><span class="var-description">: Derived key length</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$a</span><span class="var-description">: Hash algorithm</span>			</li>
				</ul>
		
			
	</div>
<a name="methodreplace" id="replace"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">replace</span> (line <span class="line-number">293</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Should be used to replace value of existing item with key</p>
<p class="description"><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../MemcacheManager/MemcacheManager.html">MemcacheManager</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodaddserver">addserver</a><span class="src-sym">(</span><span class="src-str">'localhost'</span><span class="src-sym">,&nbsp;</span><span class="src-num">11211</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodreplace">replace</a><span class="src-sym">(</span><span class="src-str">'mykey1'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$myarray1</span><span class="src-sym">,&nbsp;</span><span class="src-num">30</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodreplace">replace</a><span class="src-sym">(</span><span class="src-str">'mykey2'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$myarray2</span><span class="src-sym">,&nbsp;</span><span class="src-num">30</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodreplace">replace</a><span class="src-sym">(</span><span class="src-str">'mykey3'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$myarray3</span><span class="src-sym">,&nbsp;</span><span class="src-num">30</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodreplace">replace</a><span class="src-sym">(</span><span class="src-str">'mykey4'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$myarray4</span><span class="src-sym">,&nbsp;</span><span class="src-num">30</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodreplace">replace</a><span class="src-sym">(</span><span class="src-str">'mykey5'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$myarray5</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			replace
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$var</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$expire</span> = <span class="var-default">0</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$json</span> = <span class="var-default">false</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$encrypt</span> = <span class="var-default">false</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$zlib</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$key</span><span class="var-description">: The key that will be associated with the item</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$var</span><span class="var-description">: The variable to store. Strings and integers are stored as is, other types are stored serialized.</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$expire</span><span class="var-description">: Expiration time of the item. If it's equal to zero, the item will never expire. You can also use Unix timestamp or a number of seconds starting from current time, but in the latter case the number of seconds may not exceed 2592000 (30 days).</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$json</span><span class="var-description">: Whether to encode using JSON</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$encrypt</span><span class="var-description">: Whether to encrypt string</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$zlib</span><span class="var-description">: Use MEMCACHE_COMPRESSED to store the item compressed (uses zlib).</span>			</li>
				</ul>
		
			
	</div>
<a name="methodreport" id="report"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">report</span> (line <span class="line-number">413</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get statistics from all servers in pool and generate custom report</p>
<p class="description"><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../MemcacheManager/MemcacheManager.html">MemcacheManager</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodaddserver">addserver</a><span class="src-sym">(</span><span class="src-str">'localhost'</span><span class="src-sym">,&nbsp;</span><span class="src-num">11211</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;echo&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodreport">report</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">return:</span> HTML Table of statistics.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			report
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodset" id="set"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">set</span> (line <span class="line-number">262</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Stores an item var with key  on the memcached server</p>
<p class="description"><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../MemcacheManager/MemcacheManager.html">MemcacheManager</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodaddserver">addserver</a><span class="src-sym">(</span><span class="src-str">'localhost'</span><span class="src-sym">,&nbsp;</span><span class="src-num">11211</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodset">set</a><span class="src-sym">(</span><span class="src-str">'mykey1'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$myarray1</span><span class="src-sym">,&nbsp;</span><span class="src-num">30</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodset">set</a><span class="src-sym">(</span><span class="src-str">'mykey2'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$myarray2</span><span class="src-sym">,&nbsp;</span><span class="src-num">30</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodset">set</a><span class="src-sym">(</span><span class="src-str">'mykey3'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$myarray3</span><span class="src-sym">,&nbsp;</span><span class="src-num">30</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodset">set</a><span class="src-sym">(</span><span class="src-str">'mykey4'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$myarray4</span><span class="src-sym">,&nbsp;</span><span class="src-num">30</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodset">set</a><span class="src-sym">(</span><span class="src-str">'mykey5'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$myarray5</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			set
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$var</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$expire</span> = <span class="var-default">0</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$json</span> = <span class="var-default">false</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$encrypt</span> = <span class="var-default">false</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$zlib</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$key</span><span class="var-description">: The key that will be associated with the item</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$var</span><span class="var-description">: The variable to store. Strings and integers are stored as is, other types are stored serialized.</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$expire</span><span class="var-description">: Expiration time of the item. If it's equal to zero, the item will never expire. You can also use Unix timestamp or a number of seconds starting from current time, but in the latter case the number of seconds may not exceed 2592000 (30 days).</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$json</span><span class="var-description">: Whether to encode using JSON</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$encrypt</span><span class="var-description">: Whether to encrypt string</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$zlib</span><span class="var-description">: Use MEMCACHE_COMPRESSED to store the item compressed (uses zlib).</span>			</li>
				</ul>
		
			
	</div>
<a name="methodstatistics" id="statistics"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">statistics</span> (line <span class="line-number">183</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get statistics from all servers in pool</p>
<p class="description"><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../MemcacheManager/MemcacheManager.html">MemcacheManager</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodaddserver">addserver</a><span class="src-sym">(</span><span class="src-str">'localhost'</span><span class="src-sym">,&nbsp;</span><span class="src-num">11211</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<a href="http://www.php.net/print_r">print_r</a><span class="src-sym">(</span><span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodstatistics">statistics</a><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">return:</span> Returns a two-dimensional associative array of server statistics or FALSE  on failure.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			statistics
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodstatus" id="status"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">status</span> (line <span class="line-number">164</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns a the servers online/offline status</p>
<p class="description"><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../MemcacheManager/MemcacheManager.html">MemcacheManager</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodaddserver">addserver</a><span class="src-sym">(</span><span class="src-str">'localhost'</span><span class="src-sym">,&nbsp;</span><span class="src-num">11211</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$mc</span><span class="src-sym">-&gt;</span><a href="../MemcacheManager/MemcacheManager.html#methodstatus">status</a><span class="src-sym">(</span><span class="src-sym">)</span>&gt;<span class="src-num">0</span><span class="src-sym">)&nbsp;</span>echo&nbsp;<span class="src-str">'Connection&nbsp;Established'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">return:</span> Returns 0 if server is failed, non-zero otherwise</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			status
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$host</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$port</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$host</span><span class="var-description">: Point to the host where memcached is listening for connections. This parameter may also specify other transports like unix:///path/to/memcached.sock  to use UNIX domain sockets, in this case port  must also be set to 0.</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$port</span><span class="var-description">: Point to the port where memcached is listening for connections. This parameter is optional and its default value is 11211. Set this parameter to 0 when using UNIX domain sockets.</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Fri, 13 Nov 2009 06:22:36 -0600 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>